package com.yupi.yupicturebackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.yupicturebackend.common.DeleteRequest;
import com.yupi.yupicturebackend.model.dto.picture.*;
import com.yupi.yupicturebackend.model.entity.Picture;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yupicturebackend.model.entity.User;
import com.yupi.yupicturebackend.model.vo.PictureVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author MK
* @description 针对表【picture(图片)】的数据库操作Service
* @createDate 2024-12-15 18:22:15
*/
public interface PictureService extends IService<Picture> {
PictureVo uploadPicture(Object inputSource, PictureUploudRequest pictureUploudRequest , User loginUser);

    boolean updatePicture(PictureUpdateRequest pictureUpdateRequest, HttpServletRequest httpServletRequest);

    boolean updatePictureVo(PictureEditRequest pictureEditRequest, HttpServletRequest httpServletRequest);

    boolean deletePicture(DeleteRequest deleteRequest, HttpServletRequest request);

    Picture getPictureById(Long id);

    PictureVo getPictureVoById(Long id);

    Page<PictureVo> getPictureVoPage(Page<Picture> picturePage, HttpServletRequest request);

    List<PictureVo> uploadPictureByBatch(PictureUploudByBatchRequest pictureUploudByBatchRequest, User loginUser);

    void validPicture(Picture picture);

    QueryWrapper<Picture> getQueryWrapper(PictureQueryRequest pictureQueryRequest);

    void PictureReview(PictureReviewRequest pictureReviewRequest, User loginUser);

    void PictureReviewParams(Picture picture,User loginUser);

    void ClearPictureFile(Picture oldPicture);

    void checkPictureAuth(Picture picture, User loginUser);

    List<PictureVo> searchPictureByColor(Long spaceId, String picColor, User loginUser);

    boolean PictureEditByBatch(PictureEditByBatchRequest pictureEditByBatchRequest, User loginUser);
}
